<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<!--Copyright 2009 Phil Hess-->
<HTML>

<HEAD>

<TITLE>Status of ExtP Toolkit</TITLE>

<META NAME="AUTHOR" CONTENT="Phil Hess">
</HEAD>

<BODY>

<CENTER>
<H1>Status of ExtP Toolkit</H1>
</CENTER>

<HR>
<H3>Contents</H3>
<A HREF="#Introduction">Introduction</A><BR>
<A HREF="#Requirements">Requirements</A><BR>
<A HREF="#Installation">Installation</A><BR>
<A HREF="#Examples">Examples</A><BR>
<A HREF="#Overview">Brief Overview</A><BR>
<A HREF="#Tutorial">Brief Tutorial: A Simple Web App</A><BR>
<A HREF="#LazarusTips">Lazarus Tips</A><BR>
<A HREF="#ExtPascalEquivalents">ExtPascal Equivalents to VCL/LCL Controls</A><BR>
<A HREF="#DesignControls">Design Controls vs. Runtime Controls</A><BR>
<A HREF="#DesignProps">Design Properties vs. Runtime Properties</A><BR>
<A HREF="#LazFileTypes">File Types Used in a Lazarus ExtPascal App</A><P>

<HR>
<A name="Introduction"></A><H3>Introduction</H3>

These notes describe the status of the ExtP Toolkit, a set of tools to assist
in developing GUI Web apps with the open-source ExtPascal wrapper for the 
Ext JS JavaScript widgets (<A HREF="http://code.google.com/p/extpascal">code.google.com/p/extpascal</A>).<P>

The ExtP Toolkit provides four things:<P>
<OL>
<LI>FmToExtP command-line converter converts Delphi or Lazarus forms (.dfm/.lfm)
to ExtPascal code. This is a simple way to preserve some of the forms' visual 
layout in a Web app. The converter can be run standalone to convert existing
Delphi and Lazarus forms, or automatically from the Lazarus IDE when compiling 
an ExtPascal application. An easy-to-use GUI frontend for the converter is also
included.<P>
<LI>ExtP_Ctrls package of ExtPascal design controls for Delphi and Lazarus.
This package adds an ExtPascal tab of basic controls to the IDE's component palette.<P>
<LI>ExtP_Proj package that adds "ExtPascal Application" and "ExtPascal Form"
to the Lazarus File | New list. Selecting ExtPascal Application creates a new 
ExtPascal project that can be used with the design controls.<P>
<LI>Optional ExtP_Grid package of ExtPascal grid controls for Delphi and Lazarus.
</OL>

For a list of versions and changes, refer to the <B>changelog.txt</B> file
included with the toolkit source.<P>

You can contact the author at:&nbsp;&nbsp;MacPgmr (at) fastermac (dot) net<P>

Author:&nbsp;&nbsp;Phil Hess.<BR>
Copyright:&nbsp;&nbsp;Copyright (C) 2009-2010 Phil Hess. All rights reserved.<BR>
License:&nbsp;&nbsp;All source code developed for the ExtP Toolkit is released 
under a modified LGPL license. See files COPYING.LGPL and COPYING.modifiedLGPL.


<HR>
<A name="Requirements"></A><H3>Requirements</H3>
<OL>
<LI><B>ExtPascal source</B><P>

This source is generated by the ExtToPascal.dpr app included with ExtPascal.
See the ExtPascal site for more information:<P>

<A HREF="http://code.google.com/p/extpascal">code.google.com/p/extpascal</A><P>

The ExtP Toolkit was tested with ExtPascal 0.9.8 and Ext JS 3.2.0.<P>

<LI><B>Pascal compiler</B><P>
You will need one of these compilers:<P>
<UL>
<LI>Delphi 7 or later (for Windows)<P>
<A HREF="http://www.codegear.com/products/delphi/win32">www.codegear.com/products/delphi/win32</A>
<LI>Free Pascal and Lazarus (for Windows, OS X or Linux)<P>
<A HREF="http://www.lazarus.freepascal.org">www.lazarus.freepascal.org</A>
</UL>
The ExtP Toolkit was tested with Delphi 7 and Delphi 2006 on Windows and
Free Pascal 2.4.0 and Lazarus 0.9.28 on Windows and OS X.<P>

<LI><B>Web server</B><P>
You don't need a Web server to design and compile an ExtPascal app, but
you will need a Web server to run the app. You can use a local Web server.
<UL>
<LI><B>Windows.</B> IIS is included on the Windows XP Pro installation CD.
Apache can also be used with Windows, as follows:
<UL>
<LI>Download the Apache 2.2 .msi file and install.
<LI>Initially don't make any changes to the httpd.conf file that the .msi
installer creates in Apache's conf folder.
<LI>If you chose not to install Apache as a service, you can start it manually
from the console by changing to the Apache bin folder and entering httpd.
You will probably need to specify localhost:8080 to run your local apps
if port 80 is not the default (see the httpd.conf file).<P>
</UL>
<LI><B>OS X.</B> Apache 2 is included with Leopard (10.5). Apache 1.3 is included with Tiger (10.4). To start Apache, 
open System Preferences, click Sharing, then check Personal Web Sharing.<P>
<LI><B>Linux.</B> Apache may already be installed on your system.
</UL>
</OL>

<HR>
<A name="Installation"></A><H3>Installation</H3>

<H4>Converter</H4>
<OL>
<LI>Unzip the Toolkit source files in your ExtPascal folder, preserving the zipped subfolders.
This will create several subfolders such as <B>fmtoextp</B>, <B>extp_ctrls</B> and <B>extp_proj</B>
in your ExtPascal folder and allows Lazarus to set paths to them automatically
(see discussion of paths below).<P>

<LI>Open a terminal window and change to the <B>fmtoextp</B> folder, then compile the FmToExtP converter.<P>
With Delphi:&nbsp;&nbsp;dcc32 fmtoextp.dpr<P>

With Free Pascal:&nbsp;&nbsp;fpc fmtoextp.dpr<P>

<B><I>Tip:</I></B> You can also compile from the IDE. With Delphi, open file fmtoextp.dpr; with Lazarus,
open file fmtoextp.lpi.

<LI>The compiled converter (<B>fmtoextp.exe</B> on Windows or <B>fmtoextp</B> on OS X and Linux)
can then be placed along with its <B>fmtoextp.ini</B> configuration file anywhere you want.
However, if you leave them in the fmtoextp folder, Lazarus can set the path
to the converter automatically.<P>

<LI>To see FmToExtP's syntax, simply run it in a terminal window
without any parameters or switches. For example:<P>
With Windows:&nbsp;&nbsp;fmtoextp<P>
With OS X and Linux:&nbsp;&nbsp;./fmtoextp<P>

<LI>To compile the GUI converter, open FormsToExtPascal.dpr or FormsToExtPascal.lpi
in the <B>gui_converter</B> folder in Delphi or Lazarus.
</OL>

<H4>ExtPascal Basic Design Controls (Delphi)</H4>
<OL>
<LI>Open file <B>extp_ctrls.dpk</B> in Delphi and compile it, then close the package.<P>

<LI>Choose Components | Install Packages, then click Add in the dialog and
navigate to where Delphi created the compiled .bpl file. For example, with
Delphi 7, this is its Projects\Bpl folder. With Delphi 2006, this is its
Borland Studio Projects\Bpl folder under My Documents.
</OL>

<H4>ExtPascal Basic Design Controls (Lazarus)</H4>
<OL>
<LI><B>Skip this step with Lazarus 0.9.28 or later.</B> In order to use TCustomForm as the ancestor for the TExtWindow design control,
you need to make a small change to the Lazarus IDE code. In file <B>customformeditor.pp</B>
in the Lazarus <B>ide</B> folder, find this line in TCustomFormEditor.DeleteComponent:<P>

<PRE>
  if (AForm&lt;>nil) and (not (AForm is TCustomNonFormDesignerForm)) then
</PRE>

Change the line to this by inserting the code that's in bold:<P>

<PRE>
  if (AForm&lt;>nil) and (not (AForm is TCustomNonFormDesignerForm)) <B>and (not (AForm is TCustomForm))</B> then
</PRE>
Then save the file. The IDE will be recompiled in the next step.<P>

<LI>Choose Package | Open package file and select <B>extp_ctrls.lpk</B>.<P>

<LI>Click Compile in the Package dialog.<P>

<LI>Click Install in the Package dialog to rebuild Lazarus. Restart Lazarus
if it doesn't restart on its own after rebuilding.
</OL>

<H4>ExtPascal Project "Wizard" (Lazarus only)</H4>
<OL>
<LI>Repeat the previous steps 2-4 for the <B>extp_proj.lpk</B> package.
</OL>

<H4>ExtPascal Grid Design Controls (optional)</H4>
<OL>
<LI>These grid design controls require that the Orpheus package be installed
first.<P>

Delphi Orpheus package: <A HREF="http://sourceforge.net/projects/tporpheus/">sourceforge.net/projects/tporpheus</A><P>

Lazarus Orpheus package: <A HREF="http://wiki.lazarus.freepascal.org/OrphPort">wiki.lazarus.freepascal.org/OrphPort</A>

<LI>Once you've installed Orpheus, you can install the extp_grid.dpk (Delphi)
or extp_grid.lpk (Lazarus) package as described above for the basic design
control package.<P>

<LI>Note that if you don't install the grid package, you can still create 
ExtPascal grids in code (that is, not visually). Also, no Orpheus code is
compiled in at runtime - Orpheus is used only for designing grids visually
in the IDE.
</OL>

<HR>
<A name="Examples"></A><H3>Examples</H3>

To compile one of these examples in Lazarus, choose File | Open and select the
appropriate .lpi file, then choose Run | Build to compile it. You can also
compile using a batch or script file similar to fpc-compile.bat or fpc-compile.sh
in the hello_example subfolder.<P>

To compile an example in Delphi, use a batch file similar to delphi-compile.bat
in the hello_example subfolder.<P>

To run one of these examples, first review the tutorial below.

<UL>
<LI>hello_example project - this simple Web app is covered in the tutorial below.<P>

<LI>multiselect_example project - this simple Web app shows how to use the 
TExtUxFormMultiSelect control (list box).<P>

<LI>grid_example project - this simple Web app shows how to program a
TExtGridEditorGridPanel.<P>

<LI>fishfacts_example project - this is a Web version of the Delphi FishFact
demo app.
</UL>

<HR>
<A name="Overview"></A><H3>Brief Overview</H3>

<OL>
<LI>You can use FmToExtP to convert either standard VCL/LCL controls or
ExtPascal design controls.<P>

<LI>To use the design controls in either Delphi or Lazarus, just create a normal
application and drop controls from the ExtPascal tab on the form. This assumes
that you will then convert the app's forms using FmToExtP external to the IDE,
perhaps from the command line or the IDE's Tools menu, then compile the ExtPascal
source files that the converter creates. With this approach, you will have both
a design project and a runtime project.<P>

<LI>With Lazarus you can also automatically convert and compile from within
the IDE using a single project, as follows:<P>
<UL>
<LI>Choose File | New and select ExtPascal Application.<P>
<LI>A message box will be displayed to remind you to check the path
to the ExtPascal units and the path to the FmToExtP converter. If you
unzipped the Toolkit files in your ExtPascal directory and preserved
the Toolkit's directory structure, these should already be set for you
based on paths relative to the ExtP_Ctrls package. Use Project | Compiler 
Options to see the paths.<P>
If you need to change the paths and ExtPascal or FmToExtp is somewhere under 
your "home" folder, you can use the $(Home) macro in your paths to avoid 
hardwiring the actual user folder name. Lazarus does not appear to be able 
to expand the "~" home shortcut (OS X and Linux).<P>
If you get a warning about a non-existent "nogui" directory when you close
the Compiler Options dialog, this is because the Lazarus "nogui" widgetset has
not been compiled yet. You can click Ignore. If you want to eliminate this 
warning, just rebuild the LCL with the NoGUI widgetset (Tools | Configure).<P>
Note that the ExtPascal app is set by default to compile with the "nogui" widgetset
in order to eliminate most of the LCL and native widgetset code from the
compiled app.
<LI>Instead of starting with a normal TForm, an ExtPascal app starts with a TExtWindow. 
However, you can think of this as a "form" when designing. To create additional
TExtWindow units, choose File | New and select ExtPascal Form.<P>
<LI>The ExtPascal project employs a trick that allows Lazarus to handle both the
design control classes and the actual ExtPascal runtime classes in the same project.
This involves a couple of conditionals that it adds to each unit. The converter 
then creates a little Free Pascal configuration file (<B>extpascal.cfg</B>) that
defines UseRuntime. The Lazarus IDE never "sees" this define and so uses the
ExtP_Design_Ctrls unit while you're working in the IDE. However, when you
compile the app, Free Pascal does see the define and uses the ExtPascal runtime
units instead of the ExtP_Design_Ctrls unit.<P>
<LI>Before compiling, you need to save and name your project files so that the
converter knows what files to convert. If you try to compile a project whose
files have not been named yet, the converter should catch this and Lazarus 
will display the converter's error message.<P>
<LI>The first time you compile your app, the converter will create these files
for your project:
<UL>
<LI>appthread.pas
<LI>extpascal.cfg
<LI>.inc file for each form unit<P>
</UL>
The appthread.pas file creates the app's main thread and contains the
thread's "global" form objects. 
The .inc file contains the code that actually creates the ExtPascal user
interface objects. On subsequent compiles, the converter will update the
appthread.pas file if any form file (.lfm) has been modified since the last 
compile. It will also create a new .inc file for any modified form file. 
Naturally, this means you should never make any edits to the .inc files.
If you need to customize the ExtPascal controls at runtime, add 
your code at the bottom of the form unit's Create constructor.<P>
<LI>For more information about why the ExtPascal project's settings are set
the way they are, refer to the comments in file ExtP_Proj_Intf.pas.<P>
</UL>

<LI>When designed properly, an ExtPascal app will have no dependencies on the
VCL/LCL, the ExtP_Ctrls package of design controls, or the converter itself
and can be compiled by either Delphi or Free Pascal (see the .bat/.sh files
in the hello_example subfolder for command-line examples). Be sure you don't
accidentally try to use VCL/LCL controls in your app or include VCL/LCL units
like Forms, etc. These don't make sense at runtime and will only increase
the size of your app's executable file. However, you can use most of the
non-GUI units like SysUtils, StrUtils, Classes, Math, etc.
</OL>

<HR>
<A name="Tutorial"></A><H3>Brief Tutorial: A Simple Web App</H3>

Note: This tutorial assumes you know how to create an app with Lazarus or
Delphi. If you get stuck, please consult the source files for the tutorial
project in the hello_example subfolder. If you haven't installed the ExtPascal
design controls package and project wizard package in Lazarus, you can still
compile the app using one of the .bat/.sh files in the hello_example subfolder
(and to run your compiled app, see steps 1 and 6 below).<P>

<OL>
<LI>Prepare your Web server<P>
<UL>
<LI>Make sure you've unzipped the Ext JS files and placed them where your Web
server can find them. For example, with OS X this would be a folder named 
<B>ext</B> under /Library/WebServer/Documents. With Apache on Windows and Linux,
this folder should be under Apache's htdocs.<P>
<LI>If you're using CGIGateway.dpr (see the ExtPascal site for more information), 
make sure you've compiled this program, renamed the executable file with a .cgi
extension, and copied the executable file to where your Web server can find it.
For example, with OS X this would be into the /Library/WebServer/CGI-Executables
folder. With Apache on Windows and Linux, copy the executable into Apache's
cgi-bin folder.<P>
</UL>

<LI>Create a new project and the first form<P>
<UL>
<LI>Start Lazarus and choose File | New, then select ExtPascal Application
from the list. This will create a new project and a new form for the project.<P>
<LI>Select the form and change these properties:
<UL>
<LI>Change Name to MainWindow.
<LI>Change Title to Hello.<P>
</UL>
<LI>Select the ExtPascal tab on the component palette and click TExtButton, 
then draw a button on the form.<P>
<LI>Change the button's Text property to Click Me.<P>
<LI>Add an event handler for the button's Click event.<P>
<LI>In the TMainWindow.ExtButton1Click handler that Lazarus creates, type this 
code that will display the form that we'll create in the next section:
<PRE>
  with CurrentThread do
    begin
    AboutWindow.Free;
    AboutWindow := TAboutWindow.Create;
    AboutWindow.Show;
    end;
</PRE>
Note that form objects are not global the way they are in VCL/LCL apps.
Instead, they're declared in your app's thread class, which you can access
via CurrentThread.<P>
Also note that Show is not the same as the VCL/LCL ShowModal, which waits for
the form to be closed. Show returns immediately, so you can't call a modal form's
Free after Show. Instead, to start with a new instance of the form each
time you need to display it, call Free before creating it.<P>
<LI>Even though we haven't created the next form yet, add its unit to the
implementation uses clause in anticipation. It should look like this:<P>
<PRE>
  uses
    AppThread, aboutunit;
</PRE>
</UL>

<LI>Add a second form<P>
<UL>
<LI>Choose File | New, then select ExtPascal Form from the list. This will add
another form to the project.<P>
<LI>Select the form and change these properties:
<UL>
<LI>Change Modal to True.
<LI>Change Name to AboutWindow.
<LI>Change Title to About.<P>
</UL>
<LI>Add a button from the ExtPascal tab to the form.<P>
<LI>Change the button's Text property to Close.<P>
<LI>Add an event handler for the button's Click event.<P>
<LI>In the TAboutWindow.ExtButton1Click handler that Lazarus creates, type this code:
<PRE>
  Close;
</PRE>
</UL>

<LI>Save and name the project's files<P>
<UL>
<LI>Choose File | Save All, then save the project's files in their own folder,
using these names:
<UL>
<LI>Save the first form unit as mainunit.pas.
<LI>Save the second form unit as aboutunit.pas.
<LI>Save the project as myproject1.lpi.
</UL><P>
<LI>Now that you've named the unit files, change the {$I} include statements
in the Create constructors to reflect the new names (only needed if you're
not using FPC 2.4.0 or later):
<UL>
<LI>In mainunit.pas, change it to {$I mainunit.inc}
<LI>In aboutunit.pas, change it to {$I aboutunit.inc}
</UL><P>
Note that this step is necessary because Free Pascal 2.2.x does not support the 
{$I *.inc} syntax that Delphi and FPC 2.4 do. But it's a one-time change that
doesn't need to be made again unless you rename a form unit.
<LI>Choose Project | View Source to see the project's program file and
make sure the port is set to what your CGIGateway.dpr port is expecting
(unless you edited CGIGateway.dpr, this will be 2014).<P>
</UL>

<LI>Compile and run the app<P>
<UL>
<LI>Choose Run | Build to compile the project. Correct any mistakes that
Lazarus or the Free Pascal compiler find.<P>
<LI>Once you've compiled the project successfully, choose Run | Run. After
a bit you'll see that the app is running in the debugger by the display
of "(debugging...)" in the Lazarus title bar. You've now started your Web
app's server side app.<P>
<LI>Now switch to your browser and enter this into the URL box:<P>
<PRE>
  http://localhost/cgi-bin/cgigateway.cgi
</PRE>
This starts your Web app's browser side client app, which executes the JavaScript
code that your Lazarus server app sends it.<P>
<LI>Once the page has loaded you should see your main form's window. Click 
the Click Me button, which will display the About window. Click the Close button
or press the Esc key to close the About window.<P>
<LI>To stop the server app, switch back to Lazarus and choose Run | Stop.<P>
</UL>

<LI>Summary and deploying the app<P>
<UL>
<LI>Think about what you've just done: Through the power of Ext JS, ExtPascal,
Lazarus, Free Pascal and your Web server, you've visually created a Web app
completely in Pascal with very little programming effort.<P>
<LI>To deploy and run your server app outside of Lazarus, rename
the compiled myproject1 executable file (for example, to cgigateway.fcgi or
cgigateway.exe) and copy it to where your Web server can find it. Now shut down 
Lazarus and reload your app's browser page. You can also name the .cgi and
.fcgi/.exe files to something more meaningful.<P>
<LI>To shut down an app that is not running in the IDE, use Task Manager
(Windows) or Activity Monitor (OS X).<P>
<LI>You can also compile the app with an embedded Web server that can be
run "standalone" without the need for Apache or IIS. Choose Project |
Compiler Options and enter the path to the Indy source files in Other Units Files
and enter -dWebServer on the Other tab in Custom options, then choose Run | Build.
Now start the app from the command line and enter http://localhost/Home in your 
browser. For more information, see the ExtPascal Web site.
</UL>

</OL>

<HR>
<A name="LazarusTips"></A><H3>Lazarus Tips</H3>

<OL>
<LI>To make the Lazarus form designer work more like Delphi, choose 
Environment | Options and change the following:
<UL>
<LI>Environment | Form Editor: Uncheck "Show component captions".
<LI>Codetols | Class Completion: Select "Last" (two places) and uncheck
"Header comment for class".
</UL><P>

<LI>With a "runtime" project that you've created using the FmToExtP converter
from a normal Delphi or Lazarus project, you can create a Lazarus project file
for it as follows:
<UL>
<LI>Open the newly-created .dpr or .lpr file in Lazarus.
<LI>Select ExtPascal Application from the list when prompted.
<LI>Choose Project | Compiler Options and blank out the "Execute before" Command
on the Compilation tab.
<LI>You can also choose Project | Project Inspector and remove ExtP_Ctrls
from Required Packages.
</UL>

</OL>

<HR>
<A name="ExtPascalEquivalents"></A><H3>ExtPascal Equivalents to VCL/LCL Controls</H3>

Note that in some cases, converter support for a VCL/LCL control is still rudimentary
and has not been thoroughly tested.<P>

<TABLE BORDER=1 CELLPADDING=3>

<TR VALIGN=TOP>
<TH>VCL/LCL control</TH>
<TH>ExtPascal equivalent</TH>
<TH>FmToExtP<BR>converter supports?</TH>
<TH>ExtPascal<BR>design control?</TH>
<TH>Notes</TH>
</TR>

<TR VALIGN=TOP>
<TD>TBevel</TD>
<TD>?</TD>
<TD>&nbsp;</TD>
<TD>&nbsp;</TD>
<TD>&nbsp;</TD>
</TR>

<TR VALIGN=TOP>
<TD>TBitBtn</TD>
<TD>TExtButton</TD>
<TD>Yes</TD>
<TD>Yes</TD>
<TD>&nbsp;</TD>
</TR>

<TR VALIGN=TOP>
<TD>TButton</TD>
<TD>TExtButton</TD>
<TD>Yes</TD>
<TD>Yes</TD>
<TD>&nbsp;</TD>
</TR>

<TR VALIGN=TOP>
<TD>TChart</TD>
<TD>TExtExtChart?</TD>
<TD>&nbsp;</TD>
<TD>&nbsp;</TD>
<TD>&nbsp;</TD>
</TR>

<TR VALIGN=TOP>
<TD>TCheckBox</TD>
<TD>TExtFormCheckbox</TD>
<TD>Yes</TD>
<TD>Yes</TD>
<TD>&nbsp;</TD>
</TR>

<TR VALIGN=TOP>
<TD>TCheckListBox</TD>
<TD>?</TD>
<TD>&nbsp;</TD>
<TD>&nbsp;</TD>
<TD>&nbsp;</TD>
</TR>

<TR VALIGN=TOP>
<TD>TColorBox</TD>
<TD>TExtColorPalette</TD>
<TD>Yes</TD>
<TD>&nbsp;</TD>
<TD>&nbsp;</TD>
</TR>

<TR VALIGN=TOP>
<TD>TComboBox</TD>
<TD>TExtFormComboBox</TD>
<TD>Yes</TD>
<TD>Yes</TD>
<TD>&nbsp;</TD>
</TR>

<TR VALIGN=TOP>
<TD>TDateTimePicker</TD>
<TD>TExtDatePicker</TD>
<TD>Yes</TD>
<TD>&nbsp;</TD>
<TD>&nbsp;</TD>
</TR>

<TR VALIGN=TOP>
<TD>TDBGrid</TD>
<TD>TExtGridEditorGridPanel</TD>
<TD>Yes</TD>
<TD>&nbsp;</TD>
<TD>&nbsp;</TD>
</TR>

<TR VALIGN=TOP>
<TD>TEdit</TD>
<TD>TExtFormTextField</TD>
<TD>Yes</TD>
<TD>Yes</TD>
<TD>TExtFormNumberField, TExtFormDateField, TExtFormTimeField design controls are also included.</TD>
</TR>

<TR VALIGN=TOP>
<TD>TForm</TD>
<TD>TExtWindow</TD>
<TD>Yes</TD>
<TD>Yes</TD>
<TD>&nbsp;</TD>
</TR>

<TR VALIGN=TOP>
<TD>TGroupBox</TD>
<TD>TExtPanel</TD>
<TD>Yes</TD>
<TD>Yes</TD>
<TD>&nbsp;</TD>
</TR>

<TR VALIGN=TOP>
<TD>TImage</TD>
<TD>TExtFormLabel</TD>
<TD>Yes</TD>
<TD>Yes</TD>
<TD>Set Html property to load image (&lt;img src=... />) and leave Text property blank.</TD>
</TR>

<TR VALIGN=TOP>
<TD>TImageList</TD>
<TD>?</TD>
<TD>&nbsp;</TD>
<TD>&nbsp;</TD>
<TD>&nbsp;</TD>
</TR>

<TR VALIGN=TOP>
<TD>TLabel</TD>
<TD>TExtFormLabel</TD>
<TD>Yes</TD>
<TD>Yes</TD>
<TD>&nbsp;</TD>
</TR>

<TR VALIGN=TOP>
<TD>TLabeledEdit</TD>
<TD>TExtFormTextField</TD>
<TD>Yes</TD>
<TD>Yes</TD>
<TD>&nbsp;</TD>
</TR>

<TR VALIGN=TOP>
<TD>TListBox</TD>
<TD>TExtUxFormMultiSelect</TD>
<TD>Yes</TD>
<TD>Yes</TD>
<TD>Works best if on a container that converts to TExtPanel.</TD>
</TR>

<TR VALIGN=TOP>
<TD>TListView</TD>
<TD>?</TD>
<TD>&nbsp;</TD>
<TD>&nbsp;</TD>
<TD>&nbsp;</TD>
</TR>

<TR VALIGN=TOP>
<TD>TMainMenu</TD>
<TD>TExtMenuMenu</TD>
<TD>&nbsp;</TD>
<TD>&nbsp;</TD>
<TD>&nbsp;</TD>
</TR>

<TR VALIGN=TOP>
<TD>TMaskEdit</TD>
<TD>TExtFormTextField</TD>
<TD>Yes</TD>
<TD>Yes</TD>
<TD>&nbsp;</TD>
</TR>

<TR VALIGN=TOP>
<TD>TMemo</TD>
<TD>TExtFormTextArea</TD>
<TD>Yes</TD>
<TD>Yes</TD>
<TD>&nbsp;</TD>
</TR>

<TR VALIGN=TOP>
<TD>TMenuItem</TD>
<TD>TExtMenuItem</TD>
<TD>&nbsp;</TD>
<TD>&nbsp;</TD>
<TD>&nbsp;</TD>
</TR>

<TR VALIGN=TOP>
<TD>TMonthCalendar</TD>
<TD>TExtDatePicker</TD>
<TD>Yes</TD>
<TD>&nbsp;</TD>
<TD>&nbsp;</TD>
</TR>

<TR VALIGN=TOP>
<TD>TPageControl</TD>
<TD>TExtTabPanel</TD>
<TD>Yes</TD>
<TD>Yes</TD>
<TD>&nbsp;</TD>
</TR>

<TR VALIGN=TOP>
<TD>TPaintBox</TD>
<TD>?</TD>
<TD>&nbsp;</TD>
<TD>&nbsp;</TD>
<TD>&nbsp;</TD>
</TR>

<TR VALIGN=TOP>
<TD>TPanel</TD>
<TD>TExtPanel</TD>
<TD>Yes</TD>
<TD>Yes</TD>
<TD>&nbsp;</TD>
</TR>

<TR VALIGN=TOP>
<TD>TPopuMenu</TD>
<TD>?</TD>
<TD>&nbsp;</TD>
<TD>&nbsp;</TD>
<TD>&nbsp;</TD>
</TR>

<TR VALIGN=TOP>
<TD>TProgressBar</TD>
<TD>TExtProgressBar</TD>
<TD>Yes</TD>
<TD>&nbsp;</TD>
<TD>&nbsp;</TD>
</TR>

<TR VALIGN=TOP>
<TD>TRadioButton</TD>
<TD>TExtFormRadio</TD>
<TD>Yes</TD>
<TD>&nbsp;</TD>
<TD>&nbsp;</TD>
</TR>

<TR VALIGN=TOP>
<TD>TRadioGroup</TD>
<TD>TExtFormRadioGroup</TD>
<TD>Yes</TD>
<TD>Yes</TD>
<TD>&nbsp;</TD>
</TR>

<TR VALIGN=TOP>
<TD>TRichEdit</TD>
<TD>TExtFormHtmlEditor</TD>
<TD>Yes</TD>
<TD>Yes</TD>
<TD>&nbsp;</TD>
</TR>

<TR VALIGN=TOP>
<TD>TScrollBar</TD>
<TD>TExtSlider</TD>
<TD>Yes</TD>
<TD>&nbsp;</TD>
<TD>&nbsp;</TD>
</TR>

<TR VALIGN=TOP>
<TD>TShape</TD>
<TD>?</TD>
<TD>&nbsp;</TD>
<TD>&nbsp;</TD>
<TD>&nbsp;</TD>
</TR>

<TR VALIGN=TOP>
<TD>TSpeedButton</TD>
<TD>TExtButton</TD>
<TD>Yes</TD>
<TD>Yes</TD>
<TD>&nbsp;</TD>
</TR>

<TR VALIGN=TOP>
<TD>TSplitter</TD>
<TD>TExtSplitBar</TD>
<TD>&nbsp;</TD>
<TD>&nbsp;</TD>
<TD>&nbsp;</TD>
</TR>

<TR VALIGN=TOP>
<TD>TStaticText</TD>
<TD>TExtFormLabel</TD>
<TD>Yes</TD>
<TD>&nbsp;</TD>
<TD>&nbsp;</TD>
</TR>

<TR VALIGN=TOP>
<TD>TStringGrid</TD>
<TD>TExtGridEditorGridPanel</TD>
<TD>Yes</TD>
<TD>&nbsp;</TD>
<TD>&nbsp;</TD>
</TR>

<TR VALIGN=TOP>
<TD>TTabSheet</TD>
<TD>TExtPanel</TD>
<TD>Yes</TD>
<TD>Yes</TD>
<TD>TExtPanel_Tab design control converts to TExtPanel.</TD>
</TR>

<TR VALIGN=TOP>
<TD>TTimer</TD>
<TD>?</TD>
<TD>&nbsp;</TD>
<TD>&nbsp;</TD>
<TD>&nbsp;</TD>
</TR>

<TR VALIGN=TOP>
<TD>TToolbar</TD>
<TD>TExtToolbar</TD>
<TD>Yes</TD>
<TD>&nbsp;</TD>
<TD>&nbsp;</TD>
</TR>

<TR VALIGN=TOP>
<TD>TTrackBar</TD>
<TD>?</TD>
<TD>&nbsp;</TD>
<TD>&nbsp;</TD>
<TD>&nbsp;</TD>
</TR>

<TR VALIGN=TOP>
<TD>TTreeView</TD>
<TD>TExtTreeTreePanel</TD>
<TD>Yes</TD>
<TD>&nbsp;</TD>
<TD>&nbsp;</TD>
</TR>

<TR VALIGN=TOP>
<TD>TUpDown</TD>
<TD>?</TD>
<TD>&nbsp;</TD>
<TD>&nbsp;</TD>
<TD>&nbsp;</TD>
</TR>

<TR VALIGN=TOP>
<TD>TOvcTable</TD>
<TD>TExtGridEditorGridPanel</TD>
<TD>Yes</TD>
<TD>Yes</TD>
<TD>Orpheus table column design controls (see below) convert to TExtFormTextField,
TExtFormNumberField, TExtFormDateField, TExtFormTimeField, TExtFormCheckboxField 
and TExtFormComboBoxField in-cell editors.</TD>
</TR>

<TR VALIGN=TOP>
<TD>TOvcTCBitMap</TD>
<TD>TExtFormDisplayField?</TD>
<TD>Yes</TD>
<TD>Yes?</TD>
<TD>&nbsp;</TD>
</TR>

<TR VALIGN=TOP>
<TD>TOvcTCCheckBox</TD>
<TD>TExtFormCheckbox</TD>
<TD>Yes</TD>
<TD>Yes</TD>
<TD>&nbsp;</TD>
</TR>

<TR VALIGN=TOP>
<TD>TOvcTCColHead</TD>
<TD>&nbsp;</TD>
<TD>Yes</TD>
<TD>Yes</TD>
<TD>Converts to Header property for each table column.</TD>
</TR>

<TR VALIGN=TOP>
<TD>TOvcTCComboBox</TD>
<TD>TExtFormComboBox</TD>
<TD>Yes</TD>
<TD>Yes</TD>
<TD>&nbsp;</TD>
</TR>

<TR VALIGN=TOP>
<TD>TOvcTCGlyph</TD>
<TD>TExtFormDisplayField?</TD>
<TD>Yes</TD>
<TD>Yes?</TD>
<TD>&nbsp;</TD>
</TR>

<TR VALIGN=TOP>
<TD>TOvcTCIcon</TD>
<TD>TExtFormDisplayField?</TD>
<TD>Yes</TD>
<TD>Yes?</TD>
<TD>&nbsp;</TD>
</TR>

<TR VALIGN=TOP>
<TD>TOvcTCMemo</TD>
<TD>TExtFormTextField</TD>
<TD>Yes</TD>
<TD>Yes</TD>
<TD>&nbsp;</TD>
</TR>

<TR VALIGN=TOP>
<TD>TOvcTCRowHead</TD>
<TD>TExtFormTextField</TD>
<TD>Yes</TD>
<TD>Yes</TD>
<TD>&nbsp;</TD>
</TR>

<TR VALIGN=TOP>
<TD>TOvcTCSimpleField</TD>
<TD>TExtFormTextField</TD>
<TD>Yes</TD>
<TD>Yes</TD>
<TD>&nbsp;</TD>
</TR>

<TR VALIGN=TOP>
<TD>TOvcTCString</TD>
<TD>TExtFormTextField</TD>
<TD>Yes</TD>
<TD>Yes</TD>
<TD>&nbsp;</TD>
</TR>

<TR VALIGN=TOP>
<TD>TO32TCFlexEdit</TD>
<TD>TExtFormTextField</TD>
<TD>Yes</TD>
<TD>Yes</TD>
<TD>&nbsp;</TD>
</TR>

<TR VALIGN=TOP>
<TD>TOvcLabel</TD>
<TD>TExtFormLabel</TD>
<TD>Yes</TD>
<TD>Yes</TD>
<TD>&nbsp;</TD>
</TR>

<TR VALIGN=TOP>
<TD>TOvcURL</TD>
<TD>TExtFormLabel</TD>
<TD>Yes</TD>
<TD>Yes</TD>
<TD>&nbsp;</TD>
</TR>

<TR VALIGN=TOP>
<TD>TOvcVirtualListBox</TD>
<TD>TExtUxFormMultiSelect</TD>
<TD>Yes</TD>
<TD>Yes</TD>
<TD>Works best if on a container that converts to TExtPanel.</TD>
</TR>

<TR VALIGN=TOP>
<TD>TOvcSimpleField</TD>
<TD>TExtFormTextField</TD>
<TD>Yes</TD>
<TD>Yes</TD>
<TD>&nbsp;</TD>
</TR>

<TR VALIGN=TOP>
<TD>TO32FlexEdit</TD>
<TD>TExtFormTextField</TD>
<TD>Yes</TD>
<TD>Yes</TD>
<TD>&nbsp;</TD>
</TR>


</TABLE>
<P>


<HR>
<A name="DesignControls"></A><H3>Design Controls vs. Runtime Controls</H3>

In most cases, the name of the design control will be the same as the 
runtime control.<P>

<TABLE BORDER=1 CELLPADDING=3>

<TR VALIGN=TOP>
<TH>IDE design control</TH>
<TH>VCL ancestor</TH>
<TH>LCL ancestor</TH>
<TH>ExtPascal runtime control</TH>
<TH>Notes</TH>
</TR>

<TR VALIGN=TOP>
<TD>TExtWindow</TD>
<TD>TCustomForm</TD>
<TD>TCustomForm</TD>
<TD>TExtWindow</TD>
<TD>&nbsp;</TD>
</TR>

<TR VALIGN=TOP>
<TD>TExtButton</TD>
<TD>TButtonControl</TD>
<TD>TCustomButton</TD>
<TD>TExtButton</TD>
<TD>Not quite right yet in Delphi IDE.</TD>
</TR>

<TR VALIGN=TOP>
<TD>TExtFormLabel</TD>
<TD>TCustomLabel</TD>
<TD>TCustomLabel</TD>
<TD>TExtFormLabel</TD>
<TD>&nbsp;</TD>
</TR>

<TR VALIGN=TOP>
<TD>TExtPanel</TD>
<TD>TCustomGroupBox</TD>
<TD>TCustomGroupBox</TD>
<TD>TExtPanel</TD>
<TD>&nbsp;</TD>
</TR>

<TR VALIGN=TOP>
<TD>TExtFormTextField</TD>
<TD>TCustomEdit</TD>
<TD>TCustomEdit</TD>
<TD>TExtFormTextField</TD>
<TD>&nbsp;</TD>
</TR>

<TR VALIGN=TOP>
<TD>TExtFormNumberField</TD>
<TD>TCustomEdit</TD>
<TD>TCustomEdit</TD>
<TD>TExtFormNumberField</TD>
<TD>&nbsp;</TD>
</TR>

<TR VALIGN=TOP>
<TD>TExtFormDateField</TD>
<TD>TCustomEdit</TD>
<TD>TCustomEdit</TD>
<TD>TExtFormDateField</TD>
<TD>&nbsp;</TD>
</TR>

<TR VALIGN=TOP>
<TD>TExtFormTimeField</TD>
<TD>TCustomEdit</TD>
<TD>TCustomEdit</TD>
<TD>TExtFormTimeField</TD>
<TD>&nbsp;</TD>
</TR>

<TR VALIGN=TOP>
<TD>TExtFormTextArea</TD>
<TD>TCustomMemo</TD>
<TD>TCustomMemo</TD>
<TD>TExtFormTextArea</TD>
<TD>&nbsp;</TD>
</TR>

<TR VALIGN=TOP>
<TD>TExtFormHtmlEditor</TD>
<TD>TCustomMemo</TD>
<TD>TCustomMemo</TD>
<TD>TExtFormHtmlEditor</TD>
<TD>&nbsp;</TD>
</TR>

<TR VALIGN=TOP>
<TD>TExtFormCheckbox</TD>
<TD>TCustomCheckBox</TD>
<TD>TCustomCheckBox</TD>
<TD>TExtFormCheckBox</TD>
<TD>&nbsp;</TD>
</TR>

<TR VALIGN=TOP>
<TD>TExtFormComboBox</TD>
<TD>TCustomComboBox</TD>
<TD>TCustomComboBox</TD>
<TD>TExtFormComboBox</TD>
<TD>&nbsp;</TD>
</TR>

<TR VALIGN=TOP>
<TD>TExtFormRadioGroup</TD>
<TD>TCustomRadioGroup</TD>
<TD>TCustomRadioGroup</TD>
<TD>TExtFormRadioGroup</TD>
<TD>&nbsp;</TD>
</TR>

<TR VALIGN=TOP>
<TD>TExtUxFormMultiSelect</TD>
<TD>TCustomListBox</TD>
<TD>TCustomListBox</TD>
<TD>TExtUxFormMultiSelect</TD>
<TD>Works best if on a TExtPanel.</TD>
</TR>

<TR VALIGN=TOP>
<TD>TExtTabPanel</TD>
<TD>TPageControl</TD>
<TD>TCustomNotebook</TD>
<TD>TExtTabPanel</TD>
<TD>Not right yet in Delphi IDE.</TD>
</TR>

<TR VALIGN=TOP>
<TD>TExtPanel_Tab</TD>
<TD>TTabSheet</TD>
<TD>TCustomPage</TD>
<TD>TExtPanel</TD>
<TD>No special TTabSheet-like control, so defined one; converts to TExtPanel;
    not right yet in Delphi IDE.</TD>
</TR>

<TR VALIGN=TOP>
<TD>TExtGridEditorGridPanel</TD>
<TD>TOvcCustomTable</TD>
<TD>TOvcCustomTable</TD>
<TD>TExtGridEditorGridPanel</TD>
<TD>Orpheus table used as basis for grid design control.</TD>
</TR>

<TR VALIGN=TOP>
<TD>TExtFormTextField_Grid</TD>
<TD>TOvcTCCustomString</TD>
<TD>TOvcTCCustomString</TD>
<TD>TExtFormTextField</TD>
<TD>TExtFormTextField used for in-cell editor.</TD>
</TR>

<TR VALIGN=TOP>
<TD>TExtFormNumberField_Grid</TD>
<TD>TOvcTCCustomString</TD>
<TD>TOvcTCCustomString</TD>
<TD>TExtFormNumberField</TD>
<TD>TExtFormNumberField used for in-cell editor.</TD>
</TR>

<TR VALIGN=TOP>
<TD>TExtFormDateField_Grid</TD>
<TD>TOvcTCCustomString</TD>
<TD>TOvcTCCustomString</TD>
<TD>TExtFormDateField</TD>
<TD>TExtFormDateField used for in-cell editor.</TD>
</TR>

<TR VALIGN=TOP>
<TD>TExtFormTimeField_Grid</TD>
<TD>TOvcTCCustomString</TD>
<TD>TOvcTCCustomString</TD>
<TD>TExtFormTimeField</TD>
<TD>TExtFormTimeField used for in-cell editor.</TD>
</TR>

<TR VALIGN=TOP>
<TD>TExtFormCheckbox_Grid</TD>
<TD>TOvcTCCustomCheckBox</TD>
<TD>TOvcTCCustomCheckBox</TD>
<TD>TExtFormCheckbox</TD>
<TD>TExtFormCheckbox used for in-cell editor.</TD>
</TR>

<TR VALIGN=TOP>
<TD>TExtFormComboBox_Grid</TD>
<TD>TOvcTCCustomComboBox</TD>
<TD>TOvcTCCustomComboBox</TD>
<TD>TExtFormComboBox</TD>
<TD>TExtFormComboBox used for in-cell editor.</TD>
</TR>

</TABLE>
<P>


<HR>
<A name="DesignProps"></A><H3>Design Properties vs. Runtime Properties</H3>

Because the design controls are descended from the VCL/LCL TControl,
all properties that are published by TControl automatically appear
in the Object Inspector. Since published properties cannot be renamed or
"unpublished", some of these properties are renamed or ignored completely when
the forms are converted to ExtPascal code, as follows:<P>

<TABLE BORDER=1 CELLPADDING=3>

<TR VALIGN=TOP>
<TH>Design property</TH>
<TH>Runtime property</TH>
<TH>Notes</TH>
</TR>

<TR VALIGN=TOP>
<TD>Cursor</TD>
<TD>&nbsp;</TD>
<TD>No ExtPascal equivalent.</TD>
</TR>

<TR VALIGN=TOP>
<TD>HelpContext</TD>
<TD>&nbsp;</TD>
<TD>No ExtPascal equivalent.</TD>
</TR>

<TR VALIGN=TOP>
<TD>HelpKeyword</TD>
<TD>&nbsp;</TD>
<TD>No ExtPascal equivalent.</TD>
</TR>

<TR VALIGN=TOP>
<TD>HelpType</TD>
<TD>&nbsp;</TD>
<TD>No ExtPascal equivalent.</TD>
</TR>

<TR VALIGN=TOP>
<TD>Hint</TD>
<TD>Tooltip</TD>
<TD>Not yet fully supported by converter.</TD>
</TR>

<TR VALIGN=TOP>
<TD>Left</TD>
<TD>X</TD>
<TD>Note that Left is less ambiguous than X.</TD>
</TR>

<TR VALIGN=TOP>
<TD>Name</TD>
<TD>Id</TD>
<TD>&nbsp;</TD>
</TR>

<TR VALIGN=TOP>
<TD>Tag</TD>
<TD>&nbsp;</TD>
<TD>No ExtPascal equivalent.</TD>
</TR>

<TR VALIGN=TOP>
<TD>Top</TD>
<TD>Y</TD>
<TD>Note that Top is less ambiguous than Y.</TD>
</TR>

</TABLE>
<P>


<HR>
<A name="LazFileTypes"></A><H3>File Types Used in a Lazarus ExtPascal App</H3>

<TABLE BORDER=1 CELLPADDING=3>

<TR VALIGN=TOP>
<TH>File type</TH>
<TH>Example</TH>
<TH>Notes</TH>
</TR>

<TR VALIGN=TOP>
<TD>.lpi</TD>
<TD>project1.lpi</TD>
<TD>Project information file; XML format.</TD>
</TR>

<TR VALIGN=TOP>
<TD>.lpr</TD>
<TD>project1.lpr</TD>
<TD>Program source code file; like Delphi .dpr.</TD>
</TR>

<TR VALIGN=TOP>
<TD>.pas</TD>
<TD>unit1.pas<BR>appthread.pas</TD>
<TD>Pascal unit source code file. Each form is in a separate unit.<BR>App's thread unit created by converter.</TD>
</TR>

<TR VALIGN=TOP>
<TD>.lfm</TD>
<TD>unit1.lfm</TD>
<TD>Form design file; like Delphi .dfm.</TD>
</TR>

<TR VALIGN=TOP>
<TD>.lrs</TD>
<TD>unit1.lrs</TD>
<TD>Resource file created automatically by Lazarus from .lfm; not used in an ExtPascal app.</TD>
</TR>

<TR VALIGN=TOP>
<TD>.inc</TD>
<TD>unit1.inc</TD>
<TD>Source code include file created by converter from .lfm file; creates form's ExtPascal objects;
you can think of this as being like a Delphi .dfm or Lazarus .lrs at runtime.</TD>
</TR>

<TR VALIGN=TOP>
<TD>.cfg</TD>
<TD>extpascal.cfg</TD>
<TD>Free Pascal configuration file created by converter; extpascal.cfg defines UseRuntime when
project is compiled.</TD>
</TR>

</TABLE>
<P>

Lazarus and Free Pascal create several other files each time you compile
your project. Files in your project folder with an <B>.o</B>, <B>.ppu</B>, 
<B>.bak</B> or <B>.compiled</B> extension don't need to be backed up and
can be deleted.<P>

Although required for compiling your project, the <B>.inc</B> and
<B>extpascal.cfg</B> files will automatically be created again by the converter
the next time you compile if you accidentally delete them.


<HR>
Last updated: April 18, 2010
<P>

</BODY>

</HTML>
